<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="renderer" content="webkit" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <title><?php echo $output['site_name']?>-专场-当前热拍</title>
    <link rel="stylesheet" href="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/p/home/home.css">
    <script src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/index.js"></script>
    <script src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/jquery.min.js"></script>
</head>
<body>
<!--    首页小导航-->
<?php $zh_menu='专场'?>
<?php include template('home/zsm/menu');?>
<div class="app">
    <menu class="zhuanchang">
        <ul>
            <li><a class="current" href="index.php?act=index&op=dqrp">当前热拍</a></li>
            <li><a class="" href="index.php?act=index&op=jcyz">精彩预展</a></li>
            <li><a class="" href="index.php?act=index&op=wqhg">往期回顾</a></li>
        </ul>
    </menu>
    <?php
    if(empty($output['zc_lists'])){
        echo "<section class='floor'><center>暂无数据！！！</center></section>";
    }
    ?>
    <?php if(!empty($output['zc_lists'])):?>
        <?php foreach($output['zc_lists'] as $key=>$auction):?>
                <section class="floor">
                    <a href="index.php?act=index&op=index_current_rp_auction&zc_id=<?php echo $auction['id'];?>&zc_name=<?php echo $auction['name'];?>">
                        <h3 class="title"><?php echo $auction['name'];?></h3>
                        <div class="img-list">
                            <?php foreach($auction['imgs'] as $key=>$val):?>
                                <div class="img-box">
                                    <div>
                                        <img src="<?php echo "/bearshop/data/upload/shop/auction/".$val['auction_img1'];?>" />
                                    </div>
                                </div>
                            <?php endforeach;?>
                        </div>
                        <div class="dates">
                            <div style="padding:10px 0;" class='zc_jp_time_str' sjsx='<?php echo $auction['end_time']-time();?>' style='color:#888;'>
                                <?php
                                $sjc=$auction['end_time']-time();
                                $t=floor($sjc/3600/24);
                                $t_s=$sjc-$t*24*3600;
                                $s=floor($t_s/3600);
                                $s_s=$sjc-($t*24*3600+$s*3600);
                                $f=floor($s_s/60);
                                $m=$sjc-($t*24*3600+$s*3600+$f*60);
                                if($sjc<=0){echo "专场已结束！";}
                                else{echo "距离结束还有：".$t."天".$s."时".$f."分".$m."秒";}
                                ?>
                            </div>
                            <p>出价<span><?php echo $auction['cj_count'];?></span>&nbsp;&nbsp;围观<span><?php echo $auction['wg_num'];?></span></p>
                        </div>
                    </a>
                </section>
        <?php endforeach;?>
    <?php endif;?>

    <section class="floor">
        <?php echo $output['show_page'];?>
        <!--        <ul class="page">-->
        <!--            <li>首页</li>-->
        <!--            <li>上一页</li>-->
        <!--            <li>1/10</li>-->
        <!--            <li>下一页</li>-->
        <!--            <li>尾页</li>-->
        <!--        </ul>-->
    </section>
    <script type='text/javascript'>
        var wo=self.setInterval('sj_auto()',1000);
        function sj_auto(){
            var sj_arr=document.getElementsByClassName('zc_jp_time_str');
            for(i=0;i<sj_arr.length;i++){
                var sjc=sj_arr[i].getAttribute('sjsx');
                if(sjc<=0){
                    sj_arr[i].innerHTML="专场已结束";
                    continue;
                }
                var t=Math.floor(sjc/3600/24);
                var t_s=sjc-t*24*3600;
                var s=Math.floor(t_s/3600);
                var s_s=sjc-(t*24*3600+s*3600);
                var f=Math.floor(s_s/60);
                var m=sjc-(t*24*3600+s*3600+f*60);
                var sjc_str="距离结束还有："+t+"天"+s+"时"+f+"分"+m+"秒";
                sj_arr[i].innerHTML=sjc_str;
                sj_arr[i].setAttribute('sjsx',sjc-1);}}
    </script>
</div>
<!--引入导航菜单与底部-->
<?php $zh_nav="首页";?>
<?php include template('home/zsm/nav');?>
